package cn.iocoder.yudao.module.scrm.controller.admin.order.vo;

import cn.iocoder.yudao.module.scrm.controller.admin.commom.vo.FileInfoVO;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.TIME_ZONE_DEFAULT;

/**
 * @Author LiZhiMin
 * @Date 2024/7/2 10:51
 */
@Schema(description = "管理后台 - 订单 获取详情和分页 VO")
@Data
@ExcelIgnoreUnannotated
public class OrderDetailPageVO {
    //TODO 不做实际使用
    private Long creator;

    @Schema(description = "归属人员姓名-显示", example = "14003")
    @ExcelProperty("归属人员姓名-显示")
    private String ownerUserIdName;

    @Schema(description = "归属人员部门-所属部门-显示", example = "14003")
    @ExcelProperty("归属人员部门-显示")
    private String ownerUserIdDept;

    @Schema(description = "关联-关联单据-待查")
    private BigDecimal receiptsFiles;

    @Schema(description = "关联-已开票金额-待查")
    private BigDecimal invoiceMoney;

    @Schema(description = "关联-已回款金额-待查")
    private BigDecimal receivableMoney;

    @Schema(description = "关联-客户名称-查了")
    private String customerName;

    @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "2907")
    private Integer id;

    @Schema(description = "订单标题")
    private String title;

    @Schema(description = "关联客户id", example = "4499")
    private Integer customerId;

    @Schema(description = "关联产品id", example = "11358")
    private Integer productId;

    @Schema(description = "订单总金额-关联产品后订单金额显示为产品报价总金额；但是可以修改。")
    private BigDecimal orderTotalMoney;

    @Schema(description = "签单日期")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY, timezone = TIME_ZONE_DEFAULT)
    private LocalDate signingDate;

    @Schema(description = "订单类型  scrm_order_type", example = "1")
    private String orderType;

    @Schema(description = "开始日期")
    private LocalDateTime startDate;

    @Schema(description = "到期日期")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY, timezone = TIME_ZONE_DEFAULT)
    private LocalDate expireDate;

    @Schema(description = "客户签约人")
    private String clientSignatory;

    @Schema(description = "我方签约人")
    private String ourSignatory;

    @Schema(description = "我方签约人-显示")
    //@ExcelProperty("我方签约人")
    private String ourSignatoryName;

    @Schema(description = "付款方式   scrm_payment_method")
    private String paymentMethod;

    @Schema(description = "备注信息", example = "随便")
    private String remark;

    @Schema(description = "系统编号")
    private String systemNumber;

    @Schema(description = "归属人员id", example = "14003")
    private Long ownerUserId;

    @Schema(description = "前归属人员id", example = "30080")
    private String oldOwnerUserId;

    @Schema(description = "审批流id", example = "1371")
    private String instanceId;

    @Schema(description = "订单是否提交审批    0未提交  1已提交")
    private String instanceIfSubmit;

    @Schema(description = "审批状态-绑定流程表的审批状态")
    private String instanceState;

    /*@Schema(description = "附件url", example = "https://www.iocoder.cn")
    private Object fileUrl;

    @Schema(description = "附件url-回显的", example = "https://www.iocoder.cn")
    private List<OrderFileListVo> fileUrlVo;

    @Schema(description = "附件url", example = "https://www.iocoder.cn")
    @ExcelProperty("附件url")
    private Object pictureAttachment;

    @Schema(description = "附件url", example = "https://www.iocoder.cn")
    @ExcelProperty("附件url")
    private List<OrderFileListVo> pictureAttachmentVo;*/

    @Schema(description = "附件url", example = "https://www.iocoder.cn")
    private List<FileInfoVO> fileUrl;

    @Schema(description = "图片-附件url", example = "https://www.iocoder.cn")
    private List<OrderFileListVo> pictureAttachment;

    @Schema(description = "备用字段-文件名称")
    private  String vField;

    @Schema(description = "创建时间")
    private LocalDateTime createTime;
}
